package net.wwang.open.dao;

import net.wwang.open.pojo.Menu;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

import java.util.List;

/**
 * @author WangWei
 * @date 2020/8/11
 */
public interface MenuDao extends JpaRepository<Menu, String>, JpaSpecificationExecutor<Menu> {
	List<Menu> findMenusByParentId(String parentId);

	List<Menu> findMenusByParentIdAndName(String parentId, String name);

	Menu findMenuById(String menuId);

	void deleteMenuById(String menuId);

}
